﻿using NLog;
using Honest.MES.Contracts.Interfaces;
using System;

namespace Honest.MES.WPF.Services
{
    public class NLogLogger : ILoggerService
    {
        private static readonly Logger Logger = LogManager.GetCurrentClassLogger();

        public void Debug(string message)
        {
            Logger.Debug(message);
        }

        public void Info(string message)
        {
            Logger.Info(message);
        }

        public void Warn(string message)
        {
            Logger.Warn(message);
        }

        public void Error(string message)
        {
            Logger.Error(message);
        }

        public void Error(Exception exception, string message = null)
        {
            Logger.Error(exception, message ?? exception.Message);
        }

        public void Fatal(string message)
        {
            Logger.Fatal(message);
        }

        public void Fatal(Exception exception, string message = null)
        {
            Logger.Fatal(exception, message ?? exception.Message);
        }
    }
}